/**
 * Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.medication.service.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.core.excel.annotation.ExcelDictProperty;
import com.jeeplus.core.excel.converter.ExcelDictDTOConverter;
import com.jeeplus.core.excel.converter.ExcelUserDTOConverter;
import com.jeeplus.core.query.Query;
import com.jeeplus.core.query.QueryType;
import com.jeeplus.core.service.dto.BaseDTO;
import com.jeeplus.doctor.domain.DoctorInfo;
import com.jeeplus.drug.domain.DrugInfo;
import com.jeeplus.patient.domain.PatientInfo;
import com.jeeplus.visit.domain.VisitInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 处方信息DTO
 * @author xx
 * @version 2024-02-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class MedicationInfoDTO extends BaseDTO {

	private static final long serialVersionUID = 1L;

	        
	/**
     * 就诊记录
     */
    @Query(tableColumn = "a.visit_id", javaField = "visitId", type = QueryType.EQ)
	@ExcelProperty(value = "就诊记录", converter = ExcelDictDTOConverter.class)
	@ExcelDictProperty("")
	private String visitId;
	        
	/**
     * 病人id
     */
    @Query(tableColumn = "a.patient_id", javaField = "patientId", type = QueryType.EQ)
    @ExcelProperty(value = "病人id", converter = ExcelUserDTOConverter.class) 
	private String patientId;
	        
	/**
     * 医生id
     */
    @Query(tableColumn = "a.doctor_id", javaField = "doctorId", type = QueryType.EQ)
    @ExcelProperty(value = "医生id", converter = ExcelUserDTOConverter.class) 
	private String doctorId;
	        
	/**
     * 处方名称
     */
	@ExcelProperty("处方名称") 
	private String medicationName;
	        
	/**
     * 剂量
     */
	@ExcelProperty("剂量") 
	private String dosage;
	        
	/**
     * 吃药频率
     */
	@ExcelProperty("吃药频率") 
	private String frequency;
	        
	/**
     * 吃药周期
     */
	@ExcelProperty("吃药周期") 
	private String duration;

	@TableField(exist = false)
	private PatientInfo patientInfo;
	@TableField(exist = false)
	private DoctorInfo doctorInfo;
	@TableField(exist = false)
	private VisitInfo visitInfo;
	@TableField(exist = false)
	private DrugInfo drugInfo;

	private String followUpTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelProperty("满意度时间")
	private Date manyiduTime;

}
